import QtQuick

XRoundButtonStyle3 {
    id:_button
    spacing: 0
    picWidth:30
    picHeight: 30
    implicitWidth: 30
    implicitHeight: 30

    property var picSelect
    property bool checked: false

    MouseArea{
        anchors.fill: parent
        acceptedButtons: Qt.LeftButton
        hoverEnabled: true

        onClicked: {
            checked = !checked
            _button.clicked()
        }
    }
    onCheckedChanged: {
        picSource = checked?picNormal:picSelect
    }
    Component.onCompleted: {
        picSource = checked?picSelect:picNormal
    }
}
